!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Shepherd=e()}(this,function(){"use strict";var t=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var n=Object.prototype.toString.call(t);return"[object RegExp]"===n||"[object Date]"===n||function(t){return t.$$typeof===e}(t)}(t)};var e="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(t,e){return!1!==e.clone&&e.isMergeableObject(t)?a((n=t,Array.isArray(n)?[]:{}),t,e):t;var n}function o(t,e,o){return t.concat(e).map(function(t){return n(t,o)})}function r(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return t.propertyIsEnumerable(e)}):[]}(t))}function i(t,e){try{return e in t}catch(t){return!1}}function s(t,e,o){var s={};return o.isMergeableObject(t)&&r(t).forEach(function(e){s[e]=n(t[e],o)}),r(e).forEach(function(r){(function(t,e){return i(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,r)||(i(t,r)&&o.isMergeableObject(e[r])?s[r]=function(t,e){if(!e.customMerge)return a;var n=e.customMerge(t);return"function"==typeof n?n:a}(r,o)(t[r],e[r],o):s[r]=n(e[r],o))}),s}function a(e,r,i){(i=i||{}).arrayMerge=i.arrayMerge||o,i.isMergeableObject=i.isMergeableObject||t,i.cloneUnlessOtherwiseSpecified=n;var a=Array.isArray(r);return a===Array.isArray(e)?a?i.arrayMerge(e,r,i):s(e,r,i):n(r,i)}a.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(t,n){return a(t,n,e)},{})};var c=a;function l(t){return t instanceof HTMLElement}function p(t){return"function"==typeof t}function u(t){return"string"==typeof t}function f(t){return void 0===t}class d{on(t,e,n,o=!1){return f(this.bindings)&&(this.bindings={}),f(this.bindings[t])&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:n,once:o}),this}once(t,e,n){return this.on(t,e,n,!0)}off(t,e){return f(this.bindings)||f(this.bindings[t])?this:(f(e)?delete this.bindings[t]:this.bindings[t].forEach((n,o)=>{n.handler===e&&this.bindings[t].splice(o,1)}),this)}trigger(t,...e){return!f(this.bindings)&&this.bindings[t]&&this.bindings[t].forEach((n,o)=>{const{ctx:r,handler:i,once:s}=n,a=r||this;i.apply(a,e),s&&this.bindings[t].splice(o,1)}),this}}function h(t){const e=Object.getOwnPropertyNames(t.constructor.prototype);for(let n=0;n{if(e.isOpen()){const o=e.el&&n.currentTarget===e.el;(!f(t)&&n.currentTarget.matches(t)||o)&&e.tour.next()}}}(n,t);let r;try{r=document.querySelector(n)}catch(t){}if(!f(n)&&!r)return console.error(`No element was found for the selector supplied to advanceOn: ${n}`);r?(r.addEventListener(e,o),t.on("destroy",()=>r.removeEventListener(e,o))):(document.body.addEventListener(e,o,!0),t.on("destroy",()=>document.body.removeEventListener(e,o,!0)))}}function g(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function b(t){if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e?e.defaultView:window}return t}function y(t){var e=b(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function v(t){return t instanceof b(t).Element||t instanceof Element}function x(t){return t instanceof b(t).HTMLElement||t instanceof HTMLElement}function w(t){return t?(t.nodeName||"").toLowerCase():null}function O(t){return(v(t)?t.ownerDocument:t.document).documentElement}function $(t){return g(O(t)).left+y(t).scrollLeft}function E(t){return b(t).getComputedStyle(t)}function j(t){var e=E(t),n=e.overflow,o=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+o)}function S(t,e,n){void 0===n&&(n=!1);var o,r,i=O(e),s=g(t),a=x(e),c={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(a||!a&&!n)&&(("body"!==w(e)||j(i))&&(c=(o=e)!==b(o)&&x(o)?{scrollLeft:(r=o).scrollLeft,scrollTop:r.scrollTop}:y(o)),x(e)?((l=g(e)).x+=e.clientLeft,l.y+=e.clientTop):i&&(l.x=$(i))),{x:s.left+c.scrollLeft-l.x,y:s.top+c.scrollTop-l.y,width:s.width,height:s.height}}function T(t){return{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}}function I(t){return"html"===w(t)?t:t.assignedSlot||t.parentNode||t.host||O(t)}function M(t,e){void 0===e&&(e=[]);var n=function t(e){return["html","body","#document"].indexOf(w(e))>=0?e.ownerDocument.body:x(e)&&j(e)?e:t(I(e))}(t),o="body"===w(n),r=b(n),i=o?[r].concat(r.visualViewport||[],j(n)?n:[]):n,s=e.concat(i);return o?s:s.concat(M(I(i)))}function _(t){return["table","td","th"].indexOf(w(t))>=0}function A(t){if(!x(t)||"fixed"===E(t).position)return null;var e=t.offsetParent;if(e){var n=O(e);if("body"===w(e)&&"static"===E(e).position&&"static"!==E(n).position)return n}return e}function L(t){for(var e=b(t),n=A(t);n&&_(n)&&"static"===E(n).position;)n=A(n);return n&&"body"===w(n)&&"static"===E(n).position?e:n||function(t){for(var e=I(t);x(e)&&["html","body"].indexOf(w(e))<0;){var n=E(e);if("none"!==n.transform||"none"!==n.perspective||n.willChange&&"auto"!==n.willChange)return e;e=e.parentNode}return null}(t)||e}var P="top",C="bottom",k="right",B="left",D="auto",H=[P,C,k,B],N="start",R="end",W="clippingParents",F="viewport",q="popper",V="reference",Y=H.reduce(function(t,e){return t.concat([e+"-"+N,e+"-"+R])},[]),X=[].concat(H,[D]).reduce(function(t,e){return t.concat([e,e+"-"+N,e+"-"+R])},[]),U=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function z(t){var e=new Map,n=new Set,o=[];return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||function t(r){n.add(r.name),[].concat(r.requires||[],r.requiresIfExists||[]).forEach(function(o){if(!n.has(o)){var r=e.get(o);r&&t(r)}}),o.push(r)}(t)}),o}function Z(t){return t.split("-")[0]}function K(t,e){var n=Boolean(e.getRootNode&&e.getRootNode().host);if(t.contains(e))return!0;if(n){var o=e;do{if(o&&t.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function G(t){return Object.assign(Object.assign({},t),{},{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function J(t,e){return e===F?G(function(t){var e=b(t),n=O(t),o=e.visualViewport,r=n.clientWidth,i=n.clientHeight,s=0,a=0;return o&&(r=o.width,i=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=o.offsetLeft,a=o.offsetTop)),{width:r,height:i,x:s+$(t),y:a}}(t)):x(e)?function(t){var e=g(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):G(function(t){var e=O(t),n=y(t),o=t.ownerDocument.body,r=Math.max(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=Math.max(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+$(t),a=-n.scrollTop;return"rtl"===E(o||e).direction&&(s+=Math.max(e.clientWidth,o?o.clientWidth:0)-r),{width:r,height:i,x:s,y:a}}(O(t)))}function Q(t,e,n){var o="clippingParents"===e?function(t){var e=M(I(t)),n=["absolute","fixed"].indexOf(E(t).position)>=0&&x(t)?L(t):t;return v(n)?e.filter(function(t){return v(t)&&K(t,n)&&"body"!==w(t)}):[]}(t):[].concat(e),r=[].concat(o,[n]),i=r[0],s=r.reduce(function(e,n){var o=J(t,n);return e.top=Math.max(o.top,e.top),e.right=Math.min(o.right,e.right),e.bottom=Math.min(o.bottom,e.bottom),e.left=Math.max(o.left,e.left),e},J(t,i));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function tt(t){return t.split("-")[1]}function et(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function nt(t){var e,n=t.reference,o=t.element,r=t.placement,i=r?Z(r):null,s=r?tt(r):null,a=n.x+n.width/2-o.width/2,c=n.y+n.height/2-o.height/2;switch(i){case P:e={x:a,y:n.y-o.height};break;case C:e={x:a,y:n.y+n.height};break;case k:e={x:n.x+n.width,y:c};break;case B:e={x:n.x-o.width,y:c};break;default:e={x:n.x,y:n.y}}var l=i?et(i):null;if(null!=l){var p="y"===l?"height":"width";switch(s){case N:e[l]=Math.floor(e[l])-Math.floor(n[p]/2-o[p]/2);break;case R:e[l]=Math.floor(e[l])+Math.ceil(n[p]/2-o[p]/2)}}return e}function ot(t){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),t)}function rt(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}function it(t,e){void 0===e&&(e={});var n=e,o=n.placement,r=void 0===o?t.placement:o,i=n.boundary,s=void 0===i?W:i,a=n.rootBoundary,c=void 0===a?F:a,l=n.elementContext,p=void 0===l?q:l,u=n.altBoundary,f=void 0!==u&&u,d=n.padding,h=void 0===d?0:d,m=ot("number"!=typeof h?h:rt(h,H)),b=p===q?V:q,y=t.elements.reference,x=t.rects.popper,w=t.elements[f?b:p],$=Q(v(w)?w:w.contextElement||O(t.elements.popper),s,c),E=g(y),j=nt({reference:E,element:x,strategy:"absolute",placement:r}),S=G(Object.assign(Object.assign({},x),j)),T=p===q?S:E,I={top:$.top-T.top+m.top,bottom:T.bottom-$.bottom+m.bottom,left:$.left-T.left+m.left,right:T.right-$.right+m.right},M=t.modifiersData.offset;if(p===q&&M){var _=M[r];Object.keys(I).forEach(function(t){var e=[k,C].indexOf(t)>=0?1:-1,n=[P,C].indexOf(t)>=0?"y":"x";I[t]+=_[n]*e})}return I}var st={placement:"bottom",modifiers:[],strategy:"absolute"};function at(){for(var t=arguments.length,e=new Array(t),n=0;n=0});0===f.length&&(f=u);var d=f.reduce(function(e,n){return e[n]=it(t,{placement:n,boundary:r,rootBoundary:i,padding:s})[Z(n)],e},{});return Object.keys(d).sort(function(t,e){return d[t]-d[e]})}function bt(t,e,n){return Math.max(t,Math.min(e,n))}function yt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function vt(t){return[P,k,C,B].some(function(e){return t[e]>=0})}var xt=ct({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,o=t.options,r=o.scroll,i=void 0===r||r,s=o.resize,a=void 0===s||s,c=b(e.elements.popper),l=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&l.forEach(function(t){t.addEventListener("scroll",n.update,lt)}),a&&c.addEventListener("resize",n.update,lt),function(){i&&l.forEach(function(t){t.removeEventListener("scroll",n.update,lt)}),a&&c.removeEventListener("resize",n.update,lt)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=nt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,o=n.gpuAcceleration,r=void 0===o||o,i=n.adaptive,s=void 0===i||i,a={placement:Z(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign(Object.assign({},e.styles.popper),ut(Object.assign(Object.assign({},a),{},{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign(Object.assign({},e.styles.arrow),ut(Object.assign(Object.assign({},a),{},{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1})))),e.attributes.popper=Object.assign(Object.assign({},e.attributes.popper),{},{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},o=e.attributes[t]||{},r=e.elements[t];x(r)&&w(r)&&(Object.assign(r.style,n),Object.keys(o).forEach(function(t){var e=o[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(t){var o=e.elements[t],r=e.attributes[t]||{},i=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(function(t,e){return t[e]="",t},{});x(o)&&w(o)&&(Object.assign(o.style,i),Object.keys(r).forEach(function(t){o.removeAttribute(t)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,o=t.name,r=n.offset,i=void 0===r?[0,0]:r,s=X.reduce(function(t,n){return t[n]=function(t,e,n){var o=Z(t),r=[B,P].indexOf(o)>=0?-1:1,i="function"==typeof n?n(Object.assign(Object.assign({},e),{},{placement:t})):n,s=i[0],a=i[1];return s=s||0,a=(a||0)*r,[B,k].indexOf(o)>=0?{x:a,y:s}:{x:s,y:a}}(n,e.rects,i),t},{}),a=s[e.placement],c=a.x,l=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=l),e.modifiersData[o]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,o=t.name;if(!e.modifiersData[o]._skip){for(var r=n.mainAxis,i=void 0===r||r,s=n.altAxis,a=void 0===s||s,c=n.fallbackPlacements,l=n.padding,p=n.boundary,u=n.rootBoundary,f=n.altBoundary,d=n.flipVariations,h=void 0===d||d,m=n.allowedAutoPlacements,g=e.options.placement,b=Z(g),y=c||(b!==g&&h?function(t){if(Z(t)===D)return[];var e=dt(t);return[mt(t),e,mt(e)]}(g):[dt(g)]),v=[g].concat(y).reduce(function(t,n){return t.concat(Z(n)===D?gt(e,{placement:n,boundary:p,rootBoundary:u,padding:l,flipVariations:h,allowedAutoPlacements:m}):n)},[]),x=e.rects.reference,w=e.rects.popper,O=new Map,$=!0,E=v[0],j=0;j=0,_=M?"width":"height",A=it(e,{placement:S,boundary:p,rootBoundary:u,altBoundary:f,padding:l}),L=M?I?k:B:I?C:P;x[_]>w[_]&&(L=dt(L));var H=dt(L),R=[];if(i&&R.push(A[T]<=0),a&&R.push(A[L]<=0,A[H]<=0),R.every(function(t){return t})){E=S,$=!1;break}O.set(S,R)}if($)for(var W=function(t){var e=v.find(function(e){var n=O.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return E=e,"break"},F=h?3:1;F>0&&"break"!==W(F);F--);e.placement!==E&&(e.modifiersData[o]._skip=!0,e.placement=E,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,o=t.name,r=n.mainAxis,i=void 0===r||r,s=n.altAxis,a=void 0!==s&&s,c=n.boundary,l=n.rootBoundary,p=n.altBoundary,u=n.padding,f=n.tether,d=void 0===f||f,h=n.tetherOffset,m=void 0===h?0:h,g=it(e,{boundary:c,rootBoundary:l,padding:u,altBoundary:p}),b=Z(e.placement),y=tt(e.placement),v=!y,x=et(b),w="x"===x?"y":"x",O=e.modifiersData.popperOffsets,$=e.rects.reference,E=e.rects.popper,j="function"==typeof m?m(Object.assign(Object.assign({},e.rects),{},{placement:e.placement})):m,S={x:0,y:0};if(O){if(i){var I="y"===x?P:B,M="y"===x?C:k,_="y"===x?"height":"width",A=O[x],D=O[x]+g[I],H=O[x]-g[M],R=d?-E[_]/2:0,W=y===N?$[_]:E[_],F=y===N?-E[_]:-$[_],q=e.elements.arrow,V=d&&q?T(q):{width:0,height:0},Y=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},X=Y[I],U=Y[M],z=bt(0,$[_],V[_]),K=v?$[_]/2-R-z-X-j:W-z-X-j,G=v?-$[_]/2+R+z+U+j:F+z+U+j,J=e.elements.arrow&&L(e.elements.arrow),Q=J?"y"===x?J.clientTop||0:J.clientLeft||0:0,nt=e.modifiersData.offset?e.modifiersData.offset[e.placement][x]:0,ot=O[x]+K-nt-Q,rt=O[x]+G-nt,st=bt(d?Math.min(D,ot):D,A,d?Math.max(H,rt):H);O[x]=st,S[x]=st-A}if(a){var at="x"===x?P:B,ct="x"===x?C:k,lt=O[w],pt=bt(lt+g[at],lt,lt-g[ct]);O[w]=pt,S[w]=pt-lt}e.modifiersData[o]=S}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,o=t.name,r=n.elements.arrow,i=n.modifiersData.popperOffsets,s=Z(n.placement),a=et(s),c=[B,k].indexOf(s)>=0?"height":"width";if(r&&i){var l=n.modifiersData[o+"#persistent"].padding,p=T(r),u="y"===a?P:B,f="y"===a?C:k,d=n.rects.reference[c]+n.rects.reference[a]-i[a]-n.rects.popper[c],h=i[a]-n.rects.reference[a],m=L(r),g=m?"y"===a?m.clientHeight||0:m.clientWidth||0:0,b=d/2-h/2,y=l[u],v=g-p[c]-l[f],x=g/2-p[c]/2+b,w=bt(y,x,v),O=a;n.modifiersData[o]=((e={})[O]=w,e.centerOffset=w-x,e)}},effect:function(t){var e=t.state,n=t.options,o=t.name,r=n.element,i=void 0===r?"[data-popper-arrow]":r,s=n.padding,a=void 0===s?0:s;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&K(e.elements.popper,i)&&(e.elements.arrow=i,e.modifiersData[o+"#persistent"]={padding:ot("number"!=typeof a?a:rt(a,H))})},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,o=e.rects.reference,r=e.rects.popper,i=e.modifiersData.preventOverflow,s=it(e,{elementContext:"reference"}),a=it(e,{altBoundary:!0}),c=yt(s,o),l=yt(a,r,i),p=vt(c),u=vt(l);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:p,hasPopperEscaped:u},e.attributes.popper=Object.assign(Object.assign({},e.attributes.popper),{},{"data-popper-reference-hidden":p,"data-popper-escaped":u})}}]});function wt(){return(wt=Object.assign||function(t){for(var e=1;e{if("popper"!==e)return;const n=t.attributes[e]||{},o=t.elements[e];Object.assign(o.style,{position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}),Object.keys(n).forEach(t=>{const e=n[t];!1===e?o.removeAttribute(t):o.setAttribute(t,!0===e?"":e)})})}},{name:"computeStyles",options:{adaptive:!1}}];let n={placement:"top",strategy:"fixed",modifiers:[{name:"focusAfterRender",enabled:!0,phase:"afterWrite",fn(){setTimeout(()=>{t.el&&t.el.focus()},300)}}]};return n=wt({},n,{modifiers:Array.from(new Set([...n.modifiers,...e]))})}function $t(t){return u(t)&&""!==t?"-"!==t.charAt(t.length-1)?`${t}-`:t:""}function Et(t){const e=t.options.attachTo||{},n=Object.assign({},e);if(u(e.element)){try{n.element=document.querySelector(e.element)}catch(t){}n.element||console.error(`The element for this Shepherd step was not found ${e.element}`)}return n}function jt(t){t.tooltip&&t.tooltip.destroy();const e=Et(t);let n=e.element;const o=function(t,e){let n={modifiers:[{name:"preventOverflow",options:{altAxis:!0}},{name:"focusAfterRender",enabled:!0,phase:"afterWrite",fn(){setTimeout(()=>{e.el&&e.el.focus()},300)}}],strategy:"absolute"};e.isCentered()?n=Ot(e):n.placement=t.on;const o=e.tour&&e.tour.options&&e.tour.options.defaultStepOptions;o&&(n=Tt(o,n));return n=Tt(e.options,n)}(e,t);if(t.isCentered()){n=document.body,t.shepherdElementComponent.getElement().classList.add("shepherd-centered")}return t.tooltip=xt(n,t.el,o),t.target=e.element,o}function St(){let t=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?n:3&n|8).toString(16)})}function Tt(t,e){if(t.popperOptions){let n=Object.assign({},e,t.popperOptions);if(t.popperOptions.modifiers&&t.popperOptions.modifiers.length>0){const o=t.popperOptions.modifiers.map(t=>t.name),r=e.modifiers.filter(t=>!o.includes(t.name));n.modifiers=Array.from(new Set([...r,...t.popperOptions.modifiers]))}return n}return e}function It(){}function Mt(t,e){for(const n in e)t[n]=e[n];return t}function _t(t){return t()}function At(){return Object.create(null)}function Lt(t){t.forEach(_t)}function Pt(t){return"function"==typeof t}function Ct(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function kt(t,e){t.appendChild(e)}function Bt(t,e,n){t.insertBefore(e,n||null)}function Dt(t){t.parentNode.removeChild(t)}function Ht(t){return document.createElement(t)}function Nt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Rt(t){return document.createTextNode(t)}function Wt(){return Rt(" ")}function Ft(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function qt(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function Vt(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const o in e)null==e[o]?t.removeAttribute(o):"style"===o?t.style.cssText=e[o]:"__value"===o?t.value=t[o]=e[o]:n[o]&&n[o].set?t[o]=e[o]:qt(t,o,e[o])}function Yt(t,e,n){t.classList[n?"add":"remove"](e)}let Xt;function Ut(t){Xt=t}function zt(){if(!Xt)throw new Error("Function called outside component initialization");return Xt}function Zt(t){zt().$$.after_update.push(t)}const Kt=[],Gt=[],Jt=[],Qt=[],te=Promise.resolve();let ee=!1;function ne(t){Jt.push(t)}let oe=!1;const re=new Set;function ie(){if(!oe){oe=!0;do{for(let t=0;t{ae.delete(t),o&&(n&&t.d(1),o())}),t.o(e)}}function de(t){t&&t.c()}function he(t,e,n){const{fragment:o,on_mount:r,on_destroy:i,after_update:s}=t.$$;o&&o.m(e,n),ne(()=>{const e=r.map(_t).filter(Pt);i?i.push(...e):Lt(e),t.$$.on_mount=[]}),s.forEach(ne)}function me(t,e){const n=t.$$;null!==n.fragment&&(Lt(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ge(t,e){-1===t.$$.dirty[0]&&(Kt.push(t),ee||(ee=!0,te.then(ie)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const i=o.length?o[0]:n;return l.ctx&&r(l.ctx[e],l.ctx[e]=i)&&(l.bound[e]&&l.bound[e](i),p&&ge(t,e)),n}):[],l.update(),p=!0,Lt(l.before_update),l.fragment=!!o&&o(l.ctx),e.target){if(e.hydrate){const t=(u=e.target,Array.from(u.childNodes));l.fragment&&l.fragment.l(t),t.forEach(Dt)}else l.fragment&&l.fragment.c();e.intro&&ue(t.$$.fragment),he(t,e.target,e.anchor),ie()}var u;Ut(a)}class ye{$destroy(){me(this,1),this.$destroy=It}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(){}}function ve(t){let e,n,o,r,i;return{c(){qt(e=Ht("button"),"aria-label",n=t[3]?t[3]:null),qt(e,"class",o=`${t[1]||""} shepherd-button ${t[4]?"shepherd-button-secondary":""}`),e.disabled=t[2],qt(e,"tabindex","0")},m(n,o){Bt(n,e,o),e.innerHTML=t[5],r||(i=Ft(e,"click",function(){Pt(t[0])&&t[0].apply(this,arguments)}),r=!0)},p(r,[i]){t=r,32&i&&(e.innerHTML=t[5]),8&i&&n!==(n=t[3]?t[3]:null)&&qt(e,"aria-label",n),18&i&&o!==(o=`${t[1]||""} shepherd-button ${t[4]?"shepherd-button-secondary":""}`)&&qt(e,"class",o),4&i&&(e.disabled=t[2])},i:It,o:It,d(t){t&&Dt(e),r=!1,i()}}}function xe(t,e,n){let o,r,i,s,a,c,{config:l}=e,{step:u}=e;return t.$set=(t=>{"config"in t&&n(6,l=t.config),"step"in t&&n(7,u=t.step)}),t.$$.update=(()=>{192&t.$$.dirty&&(n(0,o=l.action?l.action.bind(u.tour):null),n(1,r=l.classes),n(2,i=!!l.disabled&&function(t){return p(t)?t.call(u):t}(l.disabled)),n(3,s=l.label),n(4,a=l.secondary),n(5,c=l.text))}),[o,r,i,s,a,c,l,u]}class we extends ye{constructor(t){super(),be(this,t,xe,ve,Ct,{config:6,step:7})}}function Oe(t,e,n){const o=t.slice();return o[2]=e[n],o}function $e(t){let e,n,o=t[1],r=[];for(let e=0;efe(r[t],1,1,()=>{r[t]=null});return{c(){for(let t=0;t{o=null}),pe())},i(t){n||(ue(o),n=!0)},o(t){fe(o),n=!1},d(t){t&&Dt(e),o&&o.d()}}}function Se(t,e,n){let o,{step:r}=e;return t.$set=(t=>{"step"in t&&n(0,r=t.step)}),t.$$.update=(()=>{1&t.$$.dirty&&n(1,o=r.options.buttons)}),[r,o]}class Te extends ye{constructor(t){super(),be(this,t,Se,je,Ct,{step:0})}}function Ie(t){let e,n,o,r,i;return{c(){e=Ht("button"),(n=Ht("span")).textContent="×",qt(n,"aria-hidden","true"),qt(e,"aria-label",o=t[0].label?t[0].label:"Close Tour"),qt(e,"class","shepherd-cancel-icon"),qt(e,"type","button")},m(o,s){Bt(o,e,s),kt(e,n),r||(i=Ft(e,"click",t[1]),r=!0)},p(t,[n]){1&n&&o!==(o=t[0].label?t[0].label:"Close Tour")&&qt(e,"aria-label",o)},i:It,o:It,d(t){t&&Dt(e),r=!1,i()}}}function Me(t,e,n){let{cancelIcon:o}=e,{step:r}=e;return t.$set=(t=>{"cancelIcon"in t&&n(0,o=t.cancelIcon),"step"in t&&n(2,r=t.step)}),[o,t=>{t.preventDefault(),r.cancel()},r]}class _e extends ye{constructor(t){super(),be(this,t,Me,Ie,Ct,{cancelIcon:0,step:2})}}function Ae(t){let e;return{c(){qt(e=Ht("h3"),"id",t[1]),qt(e,"class","shepherd-title")},m(n,o){Bt(n,e,o),t[3](e)},p(t,[n]){2&n&&qt(e,"id",t[1])},i:It,o:It,d(n){n&&Dt(e),t[3](null)}}}function Le(t,e,n){let{labelId:o}=e,{element:r}=e,{title:i}=e;return Zt(()=>{p(i)&&n(2,i=i()),n(0,r.innerHTML=i,r)}),t.$set=(t=>{"labelId"in t&&n(1,o=t.labelId),"element"in t&&n(0,r=t.element),"title"in t&&n(2,i=t.title)}),[r,o,i,function(t){Gt[t?"unshift":"push"](()=>{n(0,r=t)})}]}class Pe extends ye{constructor(t){super(),be(this,t,Le,Ae,Ct,{labelId:1,element:0,title:2})}}function Ce(t){let e,n;return e=new Pe({props:{labelId:t[0],title:t[2]}}),{c(){de(e.$$.fragment)},m(t,o){he(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.labelId=t[0]),4&n&&(o.title=t[2]),e.$set(o)},i(t){n||(ue(e.$$.fragment,t),n=!0)},o(t){fe(e.$$.fragment,t),n=!1},d(t){me(e,t)}}}function ke(t){let e,n;return e=new _e({props:{cancelIcon:t[3],step:t[1]}}),{c(){de(e.$$.fragment)},m(t,o){he(e,t,o),n=!0},p(t,n){const o={};8&n&&(o.cancelIcon=t[3]),2&n&&(o.step=t[1]),e.$set(o)},i(t){n||(ue(e.$$.fragment,t),n=!0)},o(t){fe(e.$$.fragment,t),n=!1},d(t){me(e,t)}}}function Be(t){let e,n,o,r=t[2]&&Ce(t),i=t[3]&&t[3].enabled&&ke(t);return{c(){e=Ht("header"),r&&r.c(),n=Wt(),i&&i.c(),qt(e,"class","shepherd-header")},m(t,s){Bt(t,e,s),r&&r.m(e,null),kt(e,n),i&&i.m(e,null),o=!0},p(t,[o]){t[2]?r?(r.p(t,o),4&o&&ue(r,1)):((r=Ce(t)).c(),ue(r,1),r.m(e,n)):r&&(le(),fe(r,1,1,()=>{r=null}),pe()),t[3]&&t[3].enabled?i?(i.p(t,o),8&o&&ue(i,1)):((i=ke(t)).c(),ue(i,1),i.m(e,null)):i&&(le(),fe(i,1,1,()=>{i=null}),pe())},i(t){o||(ue(r),ue(i),o=!0)},o(t){fe(r),fe(i),o=!1},d(t){t&&Dt(e),r&&r.d(),i&&i.d()}}}function De(t,e,n){let o,r,{labelId:i}=e,{step:s}=e;return t.$set=(t=>{"labelId"in t&&n(0,i=t.labelId),"step"in t&&n(1,s=t.step)}),t.$$.update=(()=>{2&t.$$.dirty&&(n(2,o=s.options.title),n(3,r=s.options.cancelIcon))}),[i,s,o,r]}class He extends ye{constructor(t){super(),be(this,t,De,Be,Ct,{labelId:0,step:1})}}function Ne(t){let e;return{c(){qt(e=Ht("div"),"class","shepherd-text"),qt(e,"id",t[1])},m(n,o){Bt(n,e,o),t[3](e)},p(t,[n]){2&n&&qt(e,"id",t[1])},i:It,o:It,d(n){n&&Dt(e),t[3](null)}}}function Re(t,e,n){let{descriptionId:o}=e,{element:r}=e,{step:i}=e;return Zt(()=>{let{text:t}=i.options;p(t)&&(t=t.call(i)),l(t)?r.appendChild(t):n(0,r.innerHTML=t,r)}),t.$set=(t=>{"descriptionId"in t&&n(1,o=t.descriptionId),"element"in t&&n(0,r=t.element),"step"in t&&n(2,i=t.step)}),[r,o,i,function(t){Gt[t?"unshift":"push"](()=>{n(0,r=t)})}]}class We extends ye{constructor(t){super(),be(this,t,Re,Ne,Ct,{descriptionId:1,element:0,step:2})}}function Fe(t){let e,n;return e=new He({props:{labelId:t[1],step:t[2]}}),{c(){de(e.$$.fragment)},m(t,o){he(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.labelId=t[1]),4&n&&(o.step=t[2]),e.$set(o)},i(t){n||(ue(e.$$.fragment,t),n=!0)},o(t){fe(e.$$.fragment,t),n=!1},d(t){me(e,t)}}}function qe(t){let e,n;return e=new We({props:{descriptionId:t[0],step:t[2]}}),{c(){de(e.$$.fragment)},m(t,o){he(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.descriptionId=t[0]),4&n&&(o.step=t[2]),e.$set(o)},i(t){n||(ue(e.$$.fragment,t),n=!0)},o(t){fe(e.$$.fragment,t),n=!1},d(t){me(e,t)}}}function Ve(t){let e,n;return e=new Te({props:{step:t[2]}}),{c(){de(e.$$.fragment)},m(t,o){he(e,t,o),n=!0},p(t,n){const o={};4&n&&(o.step=t[2]),e.$set(o)},i(t){n||(ue(e.$$.fragment,t),n=!0)},o(t){fe(e.$$.fragment,t),n=!1},d(t){me(e,t)}}}function Ye(t){let e,n,o,r,i=!f(t[2].options.title)||t[2].options.cancelIcon&&t[2].options.cancelIcon.enabled,s=!f(t[2].options.text),a=Array.isArray(t[2].options.buttons)&&t[2].options.buttons.length,c=i&&Fe(t),l=s&&qe(t),p=a&&Ve(t);return{c(){e=Ht("div"),c&&c.c(),n=Wt(),l&&l.c(),o=Wt(),p&&p.c(),qt(e,"class","shepherd-content")},m(t,i){Bt(t,e,i),c&&c.m(e,null),kt(e,n),l&&l.m(e,null),kt(e,o),p&&p.m(e,null),r=!0},p(t,[r]){4&r&&(i=!f(t[2].options.title)||t[2].options.cancelIcon&&t[2].options.cancelIcon.enabled),i?c?(c.p(t,r),4&r&&ue(c,1)):((c=Fe(t)).c(),ue(c,1),c.m(e,n)):c&&(le(),fe(c,1,1,()=>{c=null}),pe()),4&r&&(s=!f(t[2].options.text)),s?l?(l.p(t,r),4&r&&ue(l,1)):((l=qe(t)).c(),ue(l,1),l.m(e,o)):l&&(le(),fe(l,1,1,()=>{l=null}),pe()),4&r&&(a=Array.isArray(t[2].options.buttons)&&t[2].options.buttons.length),a?p?(p.p(t,r),4&r&&ue(p,1)):((p=Ve(t)).c(),ue(p,1),p.m(e,null)):p&&(le(),fe(p,1,1,()=>{p=null}),pe())},i(t){r||(ue(c),ue(l),ue(p),r=!0)},o(t){fe(c),fe(l),fe(p),r=!1},d(t){t&&Dt(e),c&&c.d(),l&&l.d(),p&&p.d()}}}function Xe(t,e,n){let{descriptionId:o}=e,{labelId:r}=e,{step:i}=e;return t.$set=(t=>{"descriptionId"in t&&n(0,o=t.descriptionId),"labelId"in t&&n(1,r=t.labelId),"step"in t&&n(2,i=t.step)}),[o,r,i]}class Ue extends ye{constructor(t){super(),be(this,t,Xe,Ye,Ct,{descriptionId:0,labelId:1,step:2})}}function ze(t){let e;return{c(){qt(e=Ht("div"),"class","shepherd-arrow"),qt(e,"data-popper-arrow","")},m(t,n){Bt(t,e,n)},d(t){t&&Dt(e)}}}function Ze(t){let e,n,o,r,i,s,a=t[4].options.arrow&&t[4].options.attachTo&&t[4].options.attachTo.element&&t[4].options.attachTo.on&&ze();o=new Ue({props:{descriptionId:t[2],labelId:t[3],step:t[4]}});let c=[{"aria-describedby":f(t[4].options.text)?null:t[2]},{"aria-labelledby":t[4].options.title?t[3]:null},t[1],{role:"dialog"},{tabindex:"0"}],l={};for(let t=0;t!!t.length)}function en(t,e,n){let o,r,i,{classPrefix:s}=e,{element:a}=e,{descriptionId:c}=e,{firstFocusableElement:l}=e,{focusableElements:p}=e,{labelId:f}=e,{lastFocusableElement:d}=e,{step:h}=e,{dataStepId:m}=e;var g;g=(()=>{n(1,m={[`data-${s}shepherd-step-id`]:h.id}),n(9,p=a.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]')),n(8,l=p[0]),n(10,d=p[p.length-1])}),zt().$$.on_mount.push(g),Zt(()=>{i!==h.options.classes&&(function(t){if(u(t)){const e=tn(t);e.length&&a.classList.remove(...e)}}(i),function(t){if(u(t)){const e=tn(t);e.length&&a.classList.add(...e)}}(i=h.options.classes))});return t.$set=(t=>{"classPrefix"in t&&n(11,s=t.classPrefix),"element"in t&&n(0,a=t.element),"descriptionId"in t&&n(2,c=t.descriptionId),"firstFocusableElement"in t&&n(8,l=t.firstFocusableElement),"focusableElements"in t&&n(9,p=t.focusableElements),"labelId"in t&&n(3,f=t.labelId),"lastFocusableElement"in t&&n(10,d=t.lastFocusableElement),"step"in t&&n(4,h=t.step),"dataStepId"in t&&n(1,m=t.dataStepId)}),t.$$.update=(()=>{16&t.$$.dirty&&(n(5,o=h.options&&h.options.cancelIcon&&h.options.cancelIcon.enabled),n(6,r=h.options&&h.options.title))}),[a,m,c,f,h,o,r,t=>{const{tour:e}=h;switch(t.keyCode){case Ke:if(0===p.length){t.preventDefault();break}t.shiftKey?document.activeElement===l&&(t.preventDefault(),d.focus()):document.activeElement===d&&(t.preventDefault(),l.focus());break;case Ge:e.options.exitOnEsc&&h.cancel();break;case Je:e.options.keyboardNavigation&&e.back();break;case Qe:e.options.keyboardNavigation&&e.next()}},l,p,d,s,()=>a,function(t){Gt[t?"unshift":"push"](()=>{n(0,a=t)})}]}class nn extends ye{constructor(t){super(),be(this,t,en,Ze,Ct,{classPrefix:11,element:0,descriptionId:2,firstFocusableElement:8,focusableElements:9,labelId:3,lastFocusableElement:10,step:4,dataStepId:1,getElement:12})}get getElement(){return this.$$.ctx[12]}}var on,rn=(function(t,e){!function(){t.exports={polyfill:function(){var t=window,e=document;if(!("scrollBehavior"in e.documentElement.style&&!0!==t.__forceSmoothScrollPolyfill__)){var n,o=t.HTMLElement||t.Element,r=468,i={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:o.prototype.scroll||c,scrollIntoView:o.prototype.scrollIntoView},s=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,a=(n=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(t,e.body,void 0!==arguments[0].left?~~arguments[0].left:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:t.scrollY||t.pageYOffset):i.scroll.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:t.scrollY||t.pageYOffset))},t.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?i.scrollBy.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset)))},o.prototype.scroll=o.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var t=arguments[0].left,e=arguments[0].top;h.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},o.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},o.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=function(t){for(;t!==e.body&&!1===f(t);)t=t.parentNode||t.host;return t}(this),o=n.getBoundingClientRect(),r=this.getBoundingClientRect();n!==e.body?(h.call(this,n,n.scrollLeft+r.left-o.left,n.scrollTop+r.top-o.top),"fixed"!==t.getComputedStyle(n).position&&t.scrollBy({left:o.left,top:o.top,behavior:"smooth"})):t.scrollBy({left:r.left,top:r.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function c(t,e){this.scrollLeft=t,this.scrollTop=e}function l(t){if(null===t||"object"!=typeof t||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function p(t,e){return"Y"===e?t.clientHeight+a1?1:c,n=.5*(1-Math.cos(Math.PI*a)),o=e.startX+(e.x-e.startX)*n,i=e.startY+(e.y-e.startY)*n,e.method.call(e.scrollable,o,i),o===e.x&&i===e.y||t.requestAnimationFrame(d.bind(t,e))}function h(n,o,r){var a,l,p,u,f=s();n===e.body?(a=t,l=t.scrollX||t.pageXOffset,p=t.scrollY||t.pageYOffset,u=i.scroll):(a=n,l=n.scrollLeft,p=n.scrollTop,u=c),d({scrollable:a,method:u,startTime:f,startX:l,startY:p,x:o,y:r})}}}}()}(on={exports:{}},on.exports),on.exports);rn.polyfill;rn.polyfill();class sn extends d{constructor(t,e={}){return super(t,e),this.tour=t,this.classPrefix=this.tour.options?$t(this.tour.options.classPrefix):"",this.styles=t.styles,h(this),this._setOptions(e),this}cancel(){this.tour.cancel(),this.trigger("cancel")}complete(){this.tour.complete(),this.trigger("complete")}destroy(){this.tooltip&&(this.tooltip.destroy(),this.tooltip=null),l(this.el)&&this.el.parentNode&&(this.el.parentNode.removeChild(this.el),this.el=null),this.target&&this._updateStepTargetOnHide(),this.trigger("destroy")}getTour(){return this.tour}hide(){this.tour.modal.hide(),this.trigger("before-hide"),this.el&&(this.el.hidden=!0),this.target&&this._updateStepTargetOnHide(),this.trigger("hide")}isCentered(){const t=Et(this);return!t.element||!t.on}isOpen(){return Boolean(this.el&&!this.el.hidden)}show(){if(p(this.options.beforeShowPromise)){const t=this.options.beforeShowPromise();if(!f(t))return t.then(()=>this._show())}this._show()}updateStepOptions(t){Object.assign(this.options,t),this.shepherdElementComponent&&this.shepherdElementComponent.$set({step:this})}getElement(){return this.el}getTarget(){return this.target}_createTooltipContent(){const t=`${this.id}-description`,e=`${this.id}-label`;return this.shepherdElementComponent=new nn({target:document.body,props:{classPrefix:this.classPrefix,descriptionId:t,labelId:e,step:this,styles:this.styles}}),this.shepherdElementComponent.getElement()}_scrollTo(t){const{element:e}=Et(this);p(this.options.scrollToHandler)?this.options.scrollToHandler(e):e instanceof Element&&"function"==typeof e.scrollIntoView&&e.scrollIntoView(t)}_getClassOptions(t){const e=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions,n=t.classes?t.classes:"",o=e&&e.classes?e.classes:"",r=[...n.split(" "),...o.split(" ")],i=new Set(r);return Array.from(i).join(" ").trim()}_setOptions(t={}){let e=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;e=c({},e||{}),this.options=Object.assign({arrow:!0},e,t);const{when:n}=this.options;this.options.classes=this._getClassOptions(t),this.destroy(),this.id=this.options.id||`step-${St()}`,n&&Object.keys(n).forEach(t=>{this.on(t,n[t],this)})}_setupElements(){f(this.el)||this.destroy(),this.el=this._createTooltipContent(),this.options.advanceOn&&m(this),jt(this)}_show(){this.trigger("before-show"),this._setupElements(),this.tour.modal||this.tour._setupModal(),this.tour.modal.setupForStep(this),this._styleTargetElementForStep(this),this.el.hidden=!1,this.options.scrollTo&&setTimeout(()=>{this._scrollTo(this.options.scrollTo)}),this.el.hidden=!1;const t=this.shepherdElementComponent.getElement(),e=this.target||document.body;e.classList.add(`${this.classPrefix}shepherd-enabled`),e.classList.add(`${this.classPrefix}shepherd-target`),t.classList.add("shepherd-enabled"),this.trigger("show")}_styleTargetElementForStep(t){const e=t.target;e&&(t.options.highlightClass&&e.classList.add(t.options.highlightClass),!1===t.options.canClickTarget&&e.classList.add("shepherd-target-click-disabled"))}_updateStepTargetOnHide(){this.options.highlightClass&&this.target.classList.remove(this.options.highlightClass),this.target.classList.remove(`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`)}}function an(t){let e,n,o,r,i;return{c(){e=Nt("svg"),qt(n=Nt("path"),"d",t[2]),qt(e,"class",o=`${t[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)},m(o,s){Bt(o,e,s),kt(e,n),t[11](e),r||(i=Ft(e,"touchmove",t[3]),r=!0)},p(t,[r]){4&r&&qt(n,"d",t[2]),2&r&&o!==(o=`${t[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)&&qt(e,"class",o)},i:It,o:It,d(n){n&&Dt(e),t[11](null),r=!1,i()}}}function cn(t,e,n){let{element:o}=e,{openingProperties:r}=e;St();let i,s=!1,a=void 0;c();function c(){n(4,r={width:0,height:0,x:0,y:0,r:0})}function l(){n(1,s=!1),d()}function p(t,e,o=0,i=0){if(t.getBoundingClientRect){const{y:e,height:s}=function(t,e){const n=t.getBoundingClientRect();let o=n.y||n.top,r=n.bottom||o+n.height;return{y:o,height:Math.max(r-o,0)}}(t),{x:a,width:c,left:l}=t.getBoundingClientRect();n(4,r={width:c+2*o,height:s+2*o,x:(a||l)-o,y:e-o,r:i})}}function u(){n(1,s=!0)}const f=t=>{t.preventDefault()};function d(){a&&(cancelAnimationFrame(a),a=void 0),window.removeEventListener("touchmove",f,{passive:!1})}return t.$set=(t=>{"element"in t&&n(0,o=t.element),"openingProperties"in t&&n(4,r=t.openingProperties)}),t.$$.update=(()=>{16&t.$$.dirty&&n(2,i=function({width:t,height:e,x:n=0,y:o=0,r:r=0}){const{innerWidth:i,innerHeight:s}=window;return`M${i},${s}H0V0H${i}V${s}ZM${n+r},${o}a${r},${r},0,0,0-${r},${r}V${e+o-r}a${r},${r},0,0,0,${r},${r}H${t+n-r}a${r},${r},0,0,0,${r}-${r}V${o+r}a${r},${r},0,0,0-${r}-${r}Z`}(r))}),[o,s,i,t=>{t.stopPropagation()},r,()=>o,c,l,p,function(t){d(),t.tour.options.useModalOverlay?(function(t){const{modalOverlayOpeningPadding:e,modalOverlayOpeningRadius:n}=t.options;if(t.target){!function t(e){if(!e)return null;const n=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY;return"hidden"!==n&&"visible"!==n&&e.scrollHeight>=e.clientHeight?e:t(e.parentElement)}(t.target);const o=()=>{a=void 0,p(t.target,0,e,n),a=requestAnimationFrame(o)};o(),window.addEventListener("touchmove",f,{passive:!1})}else c()}(t),u()):l()},u,function(t){Gt[t?"unshift":"push"](()=>{n(0,o=t)})}]}class ln extends ye{constructor(t){super(),be(this,t,cn,an,Ct,{element:0,openingProperties:4,getElement:5,closeModalOpening:6,hide:7,positionModalOpening:8,setupForStep:9,show:10})}get getElement(){return this.$$.ctx[5]}get closeModalOpening(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[7]}get positionModalOpening(){return this.$$.ctx[8]}get setupForStep(){return this.$$.ctx[9]}get show(){return this.$$.ctx[10]}}const pn=new d;return Object.assign(pn,{Tour:class extends d{constructor(t={}){return super(t),h(this),this.options=Object.assign({},{exitOnEsc:!0,keyboardNavigation:!0},t),this.classPrefix=$t(this.options.classPrefix),this.steps=[],this.addSteps(this.options.steps),["active","cancel","complete","inactive","show","start"].map(t=>{(t=>{this.on(t,e=>{(e=e||{}).tour=this,pn.trigger(t,e)})})(t)}),this._setTourID(),this}addStep(t,e){let n=t;return n instanceof sn?n.tour=this:n=new sn(this,n),f(e)?this.steps.push(n):this.steps.splice(e,0,n),n}addSteps(t){return Array.isArray(t)&&t.forEach(t=>{this.addStep(t)}),this}back(){const t=this.steps.indexOf(this.currentStep);this.show(t-1,!1)}cancel(){if(this.options.confirmCancel){const t=this.options.confirmCancelMessage||"Are you sure you want to stop the tour?";window.confirm(t)&&this._done("cancel")}else this._done("cancel")}complete(){this._done("complete")}getById(t){return this.steps.find(e=>e.id===t)}getCurrentStep(){return this.currentStep}hide(){const t=this.getCurrentStep();if(t)return t.hide()}isActive(){return pn.activeTour===this}next(){const t=this.steps.indexOf(this.currentStep);t===this.steps.length-1?this.complete():this.show(t+1,!0)}removeStep(t){const e=this.getCurrentStep();this.steps.some((e,n)=>{if(e.id===t)return e.isOpen()&&e.hide(),e.destroy(),this.steps.splice(n,1),!0}),e&&e.id===t&&(this.currentStep=void 0,this.steps.length?this.show(0):this.cancel())}show(t=0,e=!0){const n=u(t)?this.getById(t):this.steps[t];n&&(this._updateStateBeforeShow(),p(n.options.showOn)&&!n.options.showOn()?this._skipStep(n,e):(this.trigger("show",{step:n,previous:this.currentStep}),this.currentStep=n,n.show()))}start(){this.trigger("start"),this.focusedElBeforeOpen=document.activeElement,this.currentStep=null,this._setupModal(),this._setupActiveTour(),this.next()}_done(t){const e=this.steps.indexOf(this.currentStep);if(Array.isArray(this.steps)&&this.steps.forEach(t=>t.destroy()),function(t){if(t){const{steps:e}=t;e.forEach(t=>{t.options&&!1===t.options.canClickTarget&&t.options.attachTo&&t.target instanceof HTMLElement&&t.target.classList.remove("shepherd-target-click-disabled")})}}(this),this.trigger(t,{index:e}),pn.activeTour=null,this.trigger("inactive",{tour:this}),this.modal&&this.modal.hide(),("cancel"===t||"complete"===t)&&this.modal){const t=document.querySelector(".shepherd-modal-overlay-container");t&&t.remove()}l(this.focusedElBeforeOpen)&&this.focusedElBeforeOpen.focus()}_setupActiveTour(){this.trigger("active",{tour:this}),pn.activeTour=this}_setupModal(){this.modal=new ln({target:this.options.modalContainer||document.body,props:{classPrefix:this.classPrefix,styles:this.styles}})}_skipStep(t,e){const n=this.steps.indexOf(t),o=e?n+1:n-1;this.show(o,e)}_updateStateBeforeShow(){this.currentStep&&this.currentStep.hide(),this.isActive()||this._setupActiveTour()}_setTourID(){const t=this.options.tourName||"tour";this.id=`${t}--${St()}`}},Step:sn}),pn});